<script setup>
const tableData=[
  {id:'1',
    account:'22',
    name:'22',
    role:'22',
    time:'22',
    right:'22',},
  {id:'2',
    account:'22',
    name:'22',
    role:'22',
    time:'22',
    right:'22',},

]
</script>

<template>
  <div>
    <header>
      角色列表
    </header>
    <main>
      <el-button class="mainBtn">添加角色</el-button>
      <div class="table">
        <el-table :data="tableData" border style="width: 100%" :header-cell-style="{ background: '#EEEEEE' ,border: '0.5px solid #DBDBDB'}">
          <el-table-column prop="id" label="序号"/>
          <el-table-column prop="account" label="角色" />
          <el-table-column prop="name" label="描述"/>
          <el-table-column prop="role" label="添加人"/>
          <el-table-column prop="time" label="添加时间" />
          <el-table-column fixed="right" label="操作" width="300">
            <template #default style="display: flex">
              <el-button @click="edit" class="btn">编辑</el-button>
              <el-button @click="enable" class="btn">启用</el-button>

              <el-button @click="deleteEvt" class="btn">删除</el-button>
            </template>
          </el-table-column>
        </el-table>

      </div>
    </main>
  </div>
</template>

<style scoped lang="scss">
header{
  color: #6EA391;
  margin: 20px;
}
main{
  background-color: white;
  padding: 20px;
  .mainBtn{
    margin-bottom: 10px;
  }
  .table{
    .btn{
      border: none;background-color: transparent;
      color: #64A68F;
    }
  }
}
</style>